package com.wodwl.entity;

import java.util.Date;

import org.json.JSONException;
import org.json.JSONObject;

public class Post {
	private int pid;
	private String path;
	private String content;
	private String from_user;
	private String to_user;
	private long create_time;
	private int top_count;
	private int status;
	public JSONObject toJsonObject() throws JSONException{
		JSONObject object=new JSONObject();
		object.put("path", path);
		object.put("pid", pid);
		object.put("content", content);
		object.put("from_user", from_user);
		object.put("to_user", to_user);
		object.put("create_time",create_time );
		object.put("top_count",top_count );//被顶的次数
		object.put("status",status);
		return object;
	}
	public static class Status{
		public final static int Level0=0;//第一层，且没有第二层
		public final static int Level1=1;//第一层，且有第二层
		public final static int Level2=2;//第二层
	}
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getFrom_user() {
		return from_user;
	}
	public void setFrom_user(String from_user) {
		this.from_user = from_user;
	}
	public String getTo_user() {
		return to_user;
	}
	public void setTo_user(String to_user) {
		this.to_user = to_user;
	}
	
	public long getCreate_time() {
		return create_time;
	}
	public void setCreate_time(long create_time) {
		this.create_time = create_time;
	}
	public int getTop_count() {
		return top_count;
	}
	public void setTop_count(int top_count) {
		this.top_count = top_count;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}

}
